<!--
  @author duanzuocai
  @since 2018/10/23 15:12
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common :: jscss">
    <title>服务分类列表</title>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        后台产品>产品分类>
        <a lay-href="/serv/categ/list.action">后台服务分类</a>
    </blockquote>

    <div class="layui-card">

        <div class="layui-split">&nbsp;</div>

        <form method="post" action="/serv/categ/list.action">
            <div class="layui-form" th:include="servcategroy/_query :: query "></div>
        </form>

        <div class="layui-card-body">

            <div th:replace="servcategroy/_table::table"/>

            <!--表格工具条
                id属性统一定义为zmn-table-tool
                功能相似的按钮置于同一组内(layui-btn-group)，
                重要的功能按钮使用默认按钮(如以下“启用”和“停用”按钮)，
                次要的功能按钮使用原始按钮(如以下“新增报表数据源”按钮，加入样式layui-btn-primary)
                -->
            <script type="text/html" id="zmn-table-tool">
                <div class="layui-btn-container">
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/serv/categ/updateStatus.action')}">
                            <button class="layui-btn layui-btn-sm" lay-event="start">启用</button>
                            <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="stop">停用</button>
                        </zmn>
                    </div>
                    <div class="layui-btn-group">
                        <zmn th:if="${#authPermit.checkPermit('/serv/categ/detail.action')}">
                            <button type="button" class="layui-btn layui-btn-sm layui-btn-primary"  onclick="modifyCategoryName('');">
                                <i class="layui-icon"></i>新增
                            </button>
                        </zmn>
                    </div>
                </div>
            </script>
        </div>

    </div>
</div>
</div>

<script type="text/javascript" th:inline="javascript">

    var json = {
        hasUpdateStatus: [[${#authPermit.checkPermit('/serv/categ/updateStatus.action')}]],
        hasView: [[${#authPermit.checkPermit('/serv/categ/list.action')}]],
        hasEdit: [[${#authPermit.checkPermit('/serv/categ/detail.action')}]],
        hasEditName: [[${#authPermit.checkPermit('/serv/categ/updateName.action')}]],
        hasEditSort: [[${#authPermit.checkPermit('/serv/categ/updateSort.action')}]],
        hasEditSimpleSpell: [[${#authPermit.checkPermit('/serv/categ/updateSimpleSpell.action')}]],
        totalCount: [[${vo.totalCount}]],
        pageSize: [[${vo.pageSize}]],
        pageIndex: [[${vo.pageIndex}]],
        items: [[${items}]]
    };

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        art_serv_categ_list: "servcategory/zmn.art.serv.categ.list",
    }).use(['index', 'art_serv_categ_list']);

</script>
</body>
</html>